home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 8
/
008.d81
/
edit dabble file
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
60 lines
1 poke783,peek(783)and254:s=65520:poke53281,1:poke53280,5
10 open15,8,15
15 open4,8,4,"0:dabble words,seq,read"
17 input#4,nu
18 dimdf$(nu),wd$(nu),s$(nu)
20 forx=1tonu
30 input#4,df$(x)
40 input#4,wd$(x)
50 input#4,s$(x)
80 next
90 close4
95 close15
100 forx=1tonu
105 printchr$(147):print"[144]definition[160]#"x
110 poke781,3:poke782,0:syss:print"1. definition:"
115 lf=36:v=5:h=2:q$=df$(x):gosub3000
120 poke781,8:poke782,0:syss:print"[144]2. word:":print:print" "wd$(x)
130 poke781,12:poke782,0:syss:print"[144]3. sentence:"
135 lf=36:v=14:h=2:q$=s$(x):gosub3000
160 poke781,20:poke782,0:syss:print"[144]is this correct (y/n)? [160]";
170 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then170
180 ifa$="y"ora$="[217]"then 260
190 poke781,20:poke782,0:syss:print"[144]enter number to change - ";
200 poke198,0:wait198,1:geta$:a=val(a$)
210 ifa<1ora>3then190
220 ifa=1thenpoke781,5:poke782,0:syss:inputdf$(x):goto160
230 ifa=2thenpoke781,10:poke782,0:syss:inputwd$(x):goto160
240 ifa=3thenpoke781,14:poke782,0:syss:inputs$(x):goto160
260 next
900 printchr$(147)
910 print"one moment, please, while i create"
920 print"a dabble words file..........":fi$="dabble words"
1000 open15,8,15,"i0":print#15,"s0:dabble words"
1005 open4,8,4,"0:"+fi$+",seq,write"
1010 print#4,nu
1020 forx=1tonu
1030 print#4,df$(x)
1040 print#4,wd$(x)
1050 print#4,s$(x)
1080 next
1090 close4
1095 close15
2000 poke781,15:poke782,0:syss:print"'dabble words' has been created on the"
2010 print"disk.":print:print:print"have fun with your dabble file!"
2020 end:rem **************************
2997 :
2998 rem *** format statements ***
2999 :
3000 iflen(q$)>lfthen 3020
3010 poke781,v:poke782,h:syss:printq$:return
3020 yf=0:xf=lf
3030 ifmid$(q$,xf,1)=chr$(32)thenpoke781,v:poke782,h:syss
3035 ifmid$(q$,xf,1)=chr$(32)thenprintleft$(q$,xf-1):v=v+1:goto3050
3040 xf=xf-1:goto3030
3050 yf=xf+lf:ifyf>len(q$)thenyf=len(q$)-xf
3060 ifyf<=lfthenpoke781,v:poke782,h:syss:printright$(q$,yf):return
3070 ifmid$(q$,yf,1)=chr$(32)thenpoke781,v:poke782,h:syss
3075 ifmid$(q$,yf,1)=chr$(32)thenprintmid$(q$,xf+1,yf-xf):xf=yf:v=v+1:goto3060
3080 yf=yf-1:goto3070